package com.wish.contract.service.impl;

import com.wish.contract.entity.SfTermination;
import com.wish.contract.entity.TCwPaymentPlan;
import com.wish.contract.entity.TSfContract;
import com.wish.contract.entity.vo.RequestSearchSfsDto;
import com.wish.contract.entity.vo.ResponseSearchSfsDto;
import com.wish.contract.mapper.SfTerminationMapper;
import com.wish.contract.mapper.TSfContractMapper;
import com.wish.contract.service.ISfTerminationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.annotation.Id;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xiaocui
 * @since 2022-03-29
 */
@Service
public class SfTerminationServiceImpl extends ServiceImpl<SfTerminationMapper, SfTermination> implements ISfTerminationService {


    @Autowired
    private SfTerminationMapper searchContractList;

    @Override
    public List<ResponseSearchSfsDto> searchContractList(RequestSearchSfsDto requestSearchSfsDto) {
        return searchContractList.searchContractList(requestSearchSfsDto);
    }

    @Override
    public TSfContract selectSearchById(Long sfContractId) {
        return searchContractList.selectSearchById(sfContractId);
    }

    @Override
    public List<TCwPaymentPlan> selectcwPaymentPlanList(Long sfContractId, int index) {
        return searchContractList.selectcwPaymentPlanList(sfContractId, index);
    }

    @Override
    public void UpdateState(Long sfContractId) {
        searchContractList.UpdateState(sfContractId);
    }
}
